/*
 * CodePress regular expressions for Z80 ASM syntax highlighting
 */
 
// generic languages
Language.syntax = [
	{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
	{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
	{ input : /\b([0-9a-f]+h)\b/ig, output : '<var>$1</var>' }, // hexa number
	{ input : /\b([01]+b)\b/ig, output : '<var>$1</var>' }, // binary number
	{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' }, // decimal number	
	{ input : /([\w\.]+:)/g, output : '<strong>$1</strong>' }, // labels,
	{ input : /\b(ADC|ADD|AND|BIT|CALL|CCF|CP|CPD|CPDR|CPI|CPIR|CPL|DAA|DEC|DI|DJNZ|EI|EX|EXX|HALT|IM|IN|INC|IND|INDR|INI|INIR|JP|JR|LD|LDD|LDDR|LDI|LDIR|NEG|NOP|OR|OTDR|OTIR|OUT|OUTD|OUTI|POP|PUSH|RES|RET|RETI|RETN|RL|RLA|RLC|RLCA|RLD|RR|RRA|RRC|RRCA|RRD|RST|SBC|SCF|SET|SLA|SRA|SRL|SUB|XOR)\b/ig, output : '<b>$1</b>' }, // reserved words
	{ input : /([\(\){}])/g, output : '<em>$1</em>' }, // special chars;
	{ input : /([^:]|^)\;(.*?)(<br|<\/P)/g, output : '$1<i>;$2</i>$3' } // comments //
]

Language.snippets = []

Language.complete = [
	{ input : '\'', output : '\'$0\'' },
	{ input : '"', output : '"$0"' },
	{ input : '(', output : '\($0\)' },
	{ input : '[', output : '\[$0\]' },
	{ input : '{', output : '{\n\t$0\n}' }		
]

Language.shortcuts = []
